// 蜂窝蜜造平台生成代码，如手工更改，请添加到 .beeignore 忽略生成

package com.fowo.api.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fowo.api.common.model.OptionItem;
import com.fowo.api.entity.SupplierReport;
import com.fowo.api.model.supplier.report.SupplierReportItemVo;
import com.fowo.api.model.supplier.report.SupplierReportSearchParamPo;
import com.fowo.api.model.supplier.report.SupplierReportSelectGoodResult;
import com.fowo.api.model.supplier.report.SupplierReportSelectPassCountParam;
import com.fowo.api.model.supplier.report.SupplierReportSelectPassCountResult;
import com.fowo.api.model.supplier.report.SupplierReportSelectPatrolCountParam;
import com.fowo.api.model.supplier.report.SupplierReportSelectPatrolCountResult;
import com.fowo.api.model.supplier.report.SupplierReportSelectPurchaseOrderCountParam;
import com.fowo.api.model.supplier.report.SupplierReportSelectPurchaseOrderCountResult;
import com.fowo.api.model.supplier.report.SupplierReportSelectReceivedResult;
import com.fowo.api.model.supplier.report.SupplierReportSelectReviewCountParam;
import com.fowo.api.model.supplier.report.SupplierReportSelectReviewCountResult;
import com.fowo.api.model.supplier.report.SupplierReportSelectSpeedRateAndScoreParam;
import com.fowo.api.model.supplier.report.SupplierReportSelectSpeedRateAndScoreResult;
import com.fowo.api.model.supplier.report.SupplierReportSelectSupplyCountParam;
import com.fowo.api.model.supplier.report.SupplierReportSelectSupplyCountResult;
import com.fowo.api.model.supplier.report.SupplierReportSelectTaskInstanceCountParam;
import com.fowo.api.model.supplier.report.SupplierReportSelectTaskInstanceCountResult;
import com.fowo.api.model.supplier.report.SupplierReportSelectTransformCountParam;
import com.fowo.api.model.supplier.report.SupplierReportSelectTransformCountResult;
import com.fowo.api.model.supplier.report.SupplierReportSelectWeightCountResult;
import com.fowo.api.model.supplier.report.SupplierReportVo;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface SupplierReportMapper extends BaseMapper<SupplierReport> {
  Page<SupplierReportItemVo> pageSearch(
    @Param("page") Page page,
    @Param("search") SupplierReportSearchParamPo search
  );
  List<OptionItem<SupplierReportItemVo>> searchOptions(
    @Param("search") SupplierReportSearchParamPo search
  );
  List<SupplierReportItemVo> search(
    @Param("search") SupplierReportSearchParamPo search
  );
  Date searchLastUpdateTime(
    @Param("search") SupplierReportSearchParamPo search
  );
  /**
   * 搜索满足条件的所有记录的编号列表
   * @param search 搜索参数
   * @return 编号列表
   */
  List<Long> searchIds(@Param("search") SupplierReportSearchParamPo search);
  /**
   * 搜索满足条件的记录数量
   * @param search 搜索参数
   * @return 记录数量
   */
  Long searchCount(@Param("search") SupplierReportSearchParamPo search);
  Long getIdByName(@Param("name") String name);

  List<Long> getIdsByName(@Param("list") List<String> list);

  String getNameById(@Param("id") Long id);

  List<Map<String, Object>> getNameByIds(@Param("ids") List<Long> ids);
  SupplierReportVo selectVoById(@Param("id") Long id);
  /**
   * 及时率&综合评分
   */
  SupplierReportSelectSpeedRateAndScoreResult selectSpeedRateAndScore(
    SupplierReportSelectSpeedRateAndScoreParam param
  );
  /**
   * 合格率
   */
  SupplierReportSelectPassCountResult selectPassCount(
    SupplierReportSelectPassCountParam param
  );
  /**
   * 转化率
   */
  SupplierReportSelectTransformCountResult selectTransformCount(
    SupplierReportSelectTransformCountParam param
  );
  /**
   * 历史采购
   */
  SupplierReportSelectPurchaseOrderCountResult selectPurchaseOrderCount(
    SupplierReportSelectPurchaseOrderCountParam param
  );
  /**
   * 开发中
   */
  SupplierReportSelectTaskInstanceCountResult selectTaskInstanceCount(
    SupplierReportSelectTaskInstanceCountParam param
  );
  /**
   * 供货中
   */
  SupplierReportSelectSupplyCountResult selectSupplyCount(
    SupplierReportSelectSupplyCountParam param
  );
  /**
   * 巡场中
   */
  SupplierReportSelectPatrolCountResult selectPatrolCount(
    SupplierReportSelectPatrolCountParam param
  );
  /**
   * 评审中
   */
  SupplierReportSelectReviewCountResult selectReviewCount(
    SupplierReportSelectReviewCountParam param
  );
  /**
   * 本年度供货订单合格率分析
   */
  List<SupplierReportSelectGoodResult> selectGood();
  /**
   * 本年度供货订单及时率分析
   */
  List<SupplierReportSelectReceivedResult> selectReceived();
  /**
   * 本年度供货订单转化率分析
   */
  List<SupplierReportSelectWeightCountResult> selectWeightCount();
}
